﻿@using GoodMan.Infrastructure.Entities.Entity;
@using GoodMan.Infrastructure.Entities.Enum;
@{
    ViewBag.Title = "待退款订单";
    Layout = "~/Areas/WorkSpace/Views/Shared/_OfficerTemplete.cshtml";
    ItemListBox<Refund> refundList = ViewBag.RefundList;
}

<div id="content-header">
    <h1>待退款订单</h1>
</div>
<div id="breadcrumb">
	<a href="index.html" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>首页</a>
	<a href="/workspace/Officer/OrdersStatistics" class="tip-bottom">订单管理</a>
	<a href="/workspace/Officer/WaitForHandleOrder" class="current">待退款订单</a>
</div>
<div class="container-fluid">
  <div class="row-fluid">
     <div class="span12">
     <div class="widget-box">
			<div class="widget-title">			
				<h5>订单统计</h5>
			</div>
            <form id="frmorderquery" action="/workspace/Officer/WaitForHandleOrder" method="post">
            <div class="control-group" style="width: 80%; margin: 0px auto;">
                <table  border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width:3%; padding-left:15px;">申请人：</td>
                        <td style="width:15%;">
                            <input type="text" name="applyname" style="width:120px; margin-top:10px;"/>
                        </td>
                        <td style="width:4%;">所属楼栋：</td>
                        <td style="width:11%;">
                            <input type="text" name="domitoryid" style="width:80px; margin-top:10px;"/>
                        </td>
                        <td style="width:5%;">时间段：</td>
                        <td style="width:26%;">
                            <input id="dtstart" readonly="readonly" name="dtstart" type="text" onClick="WdatePicker({skin:'blue',dateFmt:'yyyy-MM-dd'})" style="width:100px; margin-top:10px;" class="{dateISO:true}"/> -- 
                            <input id="dtend" readonly="readonly" name="dtend" type="text" onClick="WdatePicker({skin:'blue',dateFmt:'yyyy-MM-dd'})" style="width:100px; margin-top:10px;" class="{dateISO:true}"/>
                        </td>
                        <td>
                            <div class="controls" style="margin-left:10px;">
                            <button type="submit" class="btn btn-primary">
                                <i class="icon-search icon-white"></i>查询</button>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            </form>
			<div class="widget-content nopadding">
				<table class="table table-bordered data-table">
					<thead>
					<tr>
					    <th width="5%">编号</th>
					    <th width="10%">申请人</th>
                        <th width="12%">手机号码</th>
					    <th width="10%">所属楼栋</th>
                        <th width="14%">申请时间</th>
                        <th width="10%">退款金额（元）</th>
                        <th width="10%">状态</th>
                        <th>操作</th>
					</tr>
					</thead>
					<tbody>
                    @{
                        if (refundList != null && refundList.Data != null && refundList.Data.Count > 0)
                        {
                            foreach (var refundinfo in refundList.Data)
                            {
                                <tr class="gradeX">
					                <td>@refundinfo.Id</td>
                                    <td>@refundinfo.ApplyUserName</td>
					                <td>@refundinfo.ApplyUserName</td>
                                    <td>@refundinfo.ApplyUserName</td>
                                    <td>@refundinfo.ApplyDate</td>
					                <td>@refundinfo.Total</td>
					                <td>申请退款</td>
                                    <td class="center">
                                    @{
                                        <a href="/workspace/OfficerController/ModifyRefund?id=@refundinfo.Id&status=2&page=@refundList.CurrentPage" class="btn btn-primary btn-mini">退款完成</a>
                                        <a href="/workspace/OfficerController/ModifyRefund?id=@refundinfo.Id&status=3&page=@refundList.CurrentPage" onclick="if (confirm('请确认【拒绝退款】操作前已跟订单用户进行沟通！')==true){return true;}else{return false;}" class="btn btn-primary btn-mini">拒绝退款</a>
                                     }
                                    
                                    </td>
					            </tr>
                            }
                        }
                        else
                        {
                            <tr class="gradeX"><td colspan="12" align="center">没有找到任何数据！</td></tr>
                        }
                    }			 
					</tbody>
			    </table>  
			</div>
            @Html.Raw(refundList.PageItemSegment)  
		</div>
     </div>
  </div>
  @{
      if (ViewBag.isSuccess != null)
      {
          if (ViewBag.isSuccess)
          { 
                <div class="Success">操作成功！</div>
          }
          else
          {
                <div class="Error">操作失败！</div>
            }
        }
    }
</div>

@section tail{
<script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
<script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
<script type="text/javascript" src="/Scripts/messages_cn.js"></script>
<script type="text/javascript" src="/Scripts/plug.js"></script>

<script type="text/javascript">
    $(function () {
        $('#likOrder').addClass('open');

        $('#likOrder').addClass('active');
    });
</script>
}

